<{include file="tpl/admin/header.html"}>

<script src="tpl/src/js/jscal2.js"></script>
<script src="tpl/src/js/unicode-letter.js"></script>
<script src="tpl/src/js/lang/cn.js"></script>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script type="text/javascript" src="tpl/admin/js/jquery.boxy.js?ver=20091101"></script>
<link rel="stylesheet" type="text/css" href="tpl/admin/css/boxy.css?ver=20091102" />

<link rel="stylesheet" type="text/css" href="tpl/admin/src/css/jscal2.css" />
<link rel="stylesheet" type="text/css" href="tpl/admin/src/css/border-radius.css" />
<link rel="stylesheet" type="text/css" href="tpl/admin/src/css/steel/steel.css" />

<script type="text/javascript">
    function approval(id,control){

        $.get('index.php?c='+control+'&a=approval', 'id='+id, function(result){
            $('#ex1result').html(result); // 返回的数据直接显示在id=ex1result的span中。
            if(result == 1)
            {alert('审批成功!!');}else{alert('审批失败!!')}
            window.location.reload(); 
        });
}


function hotkey()  
{  
    var a=window.event.keyCode;  
    if((a==13)&&(event.ctrlKey))  
    {  
       $('#close').click();
    }  
    }// end hotkey  
    document.onkeydown = hotkey; //当onkeydown 事件发生时调用hotkey函数  
//-->  
var diagnose = function(boxy) {
  alert("位置: " + boxy.getPosition() +
        "\n大小: " + boxy.getSize() +
        "\n内容区域大小: " + boxy.getContentSize() +
        "\n中心点: " + boxy.getCenter());
};
$(function() {
Boxy.DEFAULTS.title = "请输入拒绝理由";
// Callbacks 
});

 function bindConfirmBtn(id){
   var newcontent = $.trim($('#newcontent').val());
   var control = $.trim($('#control').val());
   if(newcontent != 0){
      referjj(newcontent,id,control);
   }else{ alert('必须填写拒绝理由！ ');}
}

function refuse(id,control){
      new Boxy("<div><textarea id='newcontent' name='newcontent' class='span6' cols='15' rows='10'></textarea><br /><input id='control' type='hidden'  value="+control+" /><input id='close' type='submit' class='close' name='测试' onclick='bindConfirmBtn("+ id +")' value='确认提交' /></div>", {
         beforeUnload: function() {
        },
          unloadOnHide: true
        });
        //return false;
  } 
  
function referjj(newcontent,id,control){
        var formdata = {
            'reason' : newcontent,
            'id' : id
        };
            $.post('index.php?c='+control+'&a=refuse', formdata, function(result){
            $('#ex1result').html(result); // 返回的数据直接显示在id=ex1result的span中。
            if(result == 1)
            {alert('拒绝成功!!');}else{alert('拒绝失败!!')}
            window.location.reload(); 
        });
}
</script>
<div class="breadcrumbs">
    <div class="container-fluid">
        <ul class="bread pull-left">
            <li>
            <a href="index.php?c=manage&a=index"><i class="icon-home icon-white"></i></a>
            </li>
            <li>
            <a href="index.php?c=manage&a=index">
                首页
            </a>
            </li>
        </ul>

    </div>
</div>
<div class="main">
    <{include file="tpl/admin/left.html"}>
    <div class="container-fluid">
        <div class="content">
            <div class="row-fluid no-margin">
 <!--                                  <div class="pagination" style="float:left;">
                        <ul style="color: red;">
                            <li>未审核信息：<{$all}>条</li>
                            <li class="active">
                            <a href="#">1</a>
                            </li> 
                             <li>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</li>
                        </ul>
                    </div> -->

                                        <div class="pagination" >
                       
  <table class="table table-striped table-bodered table-condensed" >
                        <thead>
                            <tr>
                                <th colspan="6" style="color:red;">未审核信息：<{$all}>条</th>
                                <th colspan="6" style="color:red;">今天需处理信息：<{$timenumber}>条</th>
                                <th colspan="6" style="color:red;">今天申请信息：<{$timenumber}>条</th>
                            </tr>
                        </thead>
                    </table>
</div>
                <div class="span12" style="height: 599px;overflow-y: auto;margin-left:0px;">
   <!--                                              <marquee direction='up' height='400' width='963' id=m onmouseout=m.start() onMouseOver=m.stop() scrollamount=2 align="center"> -->
                    <table class="table table-striped table-bodered" >
                        <thead>
                            <tr>
                                <th colspan="3">待审核信息</th>
                            </tr>
                            <tr>
                                <th>申请内容</th>
                                <th style="width:100px">操作</th>
                            </tr>
                        </thead>
                        <tbody >
                              <{foreach item=colorname from=$result_rulesinfo key=enname}>
                            <tr>
                                <td><a href=""><{$colorname.rulename}></a></td>
                                <td> 
                                     <{if $colorname.uses eq '0'}>
                                    <a href="javascript:approval(<{$colorname.id}>,'rulesform')">通过</a> | <a href="javascript:refuse(<{$colorname.id}>,'rulesform');">拒绝</a>
                                     <{else}>
                                     <{/if}>
                               </td>
                            </tr>
                                <{/foreach}>                                                
                        </tbody>
                    </table>
                </div>
                         <!--   </marquee>   --> 

<!--                     <div class="pagination" style="float:left;padding-left: 500px;">
                       
  <table class="table table-striped table-bodered table-condensed" >
                        <thead>
                            <tr>
                                <th colspan="6" style="color:red;">未审核信息：<{$all}>条</th>
                            </tr>
                        </thead>
                    </table>
</div> -->
                    <table class="table table-striped table-bodered table-condensed" style="margin-top:12px;float: left;">
                        <thead>
                            <tr>
                                <th colspan="6">版权声明：昕竹轩 - 后台管理系统 Preview 版本1.0.1 </th>
                            </tr>
                            <tr>
                                <td colspan="6">
                                 <div style="height:200px;border:1px solid #666;overflow-y:scroll;">
                                     <font color="#FF0000">1.0.1 版本更新内容 </font>时间:2012-11-29<br />
                                     1、采集系统完工(添加、删除、管理、查询)前后台管理设计.<br />
                                 </div>
                                </td>
                            </tr>
                            <tr>
                                <th colspan="6">快速链接</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>
                                    <a href="index.php?c=rulesform&a=index&t=info&limit=10">采集规则表</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <a href="index.php?c=modifyform&a=index&t=user&limit=10">
                                        密码修改
                                    </a>
                                </td>
                                <td>
                                    <a href="index.php?c=userlist&a=index&t=user&limit=10">
                                        普通用户表
                                    </a>
                                </td>
                                <td>
                                    <a href="index.php?c=usersform&a=index&t=user">
                                        后台成员表
                                    </a>
                                </td>
                                <td>
                                    <a href="index.php?c=aclform&a=index&t=user">
                                        权限分配表
                                    </a>
                                </td>
                                <td>
                                    <a href="index.php?c=messageinfoform&a=index&t=message&limit=10">
                                        内容管理
                                    </a>
                                </td>
                                <td>
                                    <a href="index.php?c=categorylist&a=index&t=message">
                                        分类管理
                                    </a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
        </div>	
    </div>
	</div>
<{include file="tpl/admin/footer.html"}>
